#pragma once
#include <Windows.h>
#include <d3d9.h>
class Game
{
private:
	static HRESULT CALLBACK WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
protected:
	int _width;
	int _height;
	char* _name;

public:
	HWND hwnd;
	HINSTANCE hInstance;
	LPDIRECT3D9 d3d;//doi tuong directx
	LPDIRECT3DDEVICE9 d3ddev;//thiet bi ve	


	Game(HINSTANCE hIns, char* windowName, int width, int _height);
	~Game(void);
	bool InitWindow();
	bool InitDX();
	void Load();
	void Run();
	void Update(float time);

	void Render();
	void Shutdown();
};

